Learn R Programming

GISTools (version 0.7-4)

Polygon Areas: Area of Each Polygon

Description

Given a set of polygons, returns the area of each polygon.

Usage

poly.areas(polys)

Arguments

polys
A SpatialPolygons or SpatialPolygonsDataFrame object.

Value

A list of areas of the same length as the number of polygons in polys.

Examples

Run this code
# Data for New Haven to use in example
data(newhaven)
# What is the area each census block?
poly.areas(blocks)

Run the code above in your browser using DataLab